package com.lanyam.travel.base.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * <p>
 * 产品与票类型的折扣关系
 * </p>
 *
 * @author rosson
 * @since 2020-02-24
 */
@TableName("product_ticket")
public class ProductTicket extends Model<ProductTicket> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonProperty(value="id")
    @TableId(value = "id")
    private String id;
    /**
     * 产品id
     */
    @JsonProperty(value="productId")
    @TableField("product_id")
    private String productId;
    /**
     * 优惠比例或优惠金额
     */
    @JsonProperty(value="discountRate")
    @TableField("discount_rate")
    private BigDecimal discountRate;
    /**
     * 优惠方式：0为比例，1为金额
     */
    @JsonProperty(value="discountType")
    @TableField("discount_type")
    private Integer discountType;
    
    /**
     * 票类型id
     */
    @JsonProperty(value="ticketTypeId")
    @TableField("ticket_type_id")
    private String ticketTypeId;

    @JsonProperty(value="ticketType")
    @TableField(exist = false)
    private int ticketType;
   
    @JsonProperty(value="content")
    @TableField(exist = false)
    private String content;

    
	public int getTicketType() {
		return ticketType;
	}

	public void setTicketType(int ticketType) {
		this.ticketType = ticketType;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

    public String getProductId() {
        return productId;
    }

    public ProductTicket setProductId(String productId) {
        this.productId = productId;
        return this;
    }

    public BigDecimal getDiscountRate() {
        return discountRate;
    }

    public ProductTicket setDiscountRate(BigDecimal discountRate) {
        this.discountRate = discountRate;
        return this;
    }

    public Integer getDiscountType() {
        return discountType;
    }

    public ProductTicket setDiscountType(Integer discountType) {
        this.discountType = discountType;
        return this;
    }



	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTicketTypeId() {
		return ticketTypeId;
	}

	public void setTicketTypeId(String ticketTypeId) {
		this.ticketTypeId = ticketTypeId;
	}

	@Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProductTicket{" +
        ", id=" + id +
        ", productId=" + productId +
        ", discountRate=" + discountRate +
        ", discountType=" + discountType +
        ", ticketTypeId=" + ticketTypeId +
        "}";
    }
}
